/*
 * Title: script.js
 * Description: Javascript file for proofGallery
 * Package: proofGallery ver. 0.2
 * Author: Jesse Grobstein
 * Organization: I Services, Inc.
 * URI: http://iservicesinc.net
*/
$(document).ready(function(){
	$(document).bind('contextmenu', function(e){return false;});
	$("#cbcSlider").slider({
        range: "min",  
        min: 1,  
        value: 50, 
        slide: function(event, ui) {
            var i = 0;
            i = Math.round(255 / 100 * ui.value); // 2.55 * (0 - 100) = 0 - 255
            var color = 'rgb(' + i + ',' + i + ',' + i + ')';
            $("body").css({
                'background': color
            });
        }
    });
	$("a.fancybox").fancybox({
		helpers : { 
			overlay: {
				opacity: 0.6, // or the opacity you want 
				css: {'background-color': '#000'} // or your preferred hex color value
			} // overlay 
		} // helpers
	});
	$('#selectAll').click(function() {
		$('.checkpic').each(function() {
			if($(this).is(':checked')) {
				$(this).removeAttr('checked');
			} else {
				$(this).attr('checked', 'checked');
			}
			
		})
	});
	$("span.context").bind('contextmenu', function(e){return true;});
});